3.2.97 \(\int \frac {1+x}{2 x+x^2} \, dx\)

Optimal. Leaf size=12 \[ \frac {1}{2} \log \left (x^2+2 x\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {628} \begin {gather*} \frac {1}{2} \log \left (x^2+2 x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + x)/(2*x + x^2),x]

[Out]

Log[2*x + x^2]/2

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin {align*} \int \frac {1+x}{2 x+x^2} \, dx &=\frac {1}{2} \log \left (2 x+x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 15, normalized size = 1.25 \begin {gather*} \frac {\log (x)}{2}+\frac {1}{2} \log (x+2) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + x)/(2*x + x^2),x]

[Out]

Log[x]/2 + Log[2 + x]/2

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1+x}{2 x+x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(1 + x)/(2*x + x^2),x]

[Out]

IntegrateAlgebraic[(1 + x)/(2*x + x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 10, normalized size = 0.83 \begin {gather*} \frac {1}{2} \, \log \left (x^{2} + 2 \, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x^2+2*x),x, algorithm="fricas")

[Out]

1/2*log(x^2 + 2*x)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 13, normalized size = 1.08 \begin {gather*} \frac {1}{2} \, \log \left (2 \, {\left | \frac {1}{2} \, x^{2} + x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x^2+2*x),x, algorithm="giac")

[Out]

1/2*log(2*abs(1/2*x^2 + x))

________________________________________________________________________________________

maple [A]  time = 0.04, size = 9, normalized size = 0.75 \begin {gather*} \frac {\ln \left (\left (x +2\right ) x \right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x+1)/(x^2+2*x),x)

[Out]

1/2*ln(x*(x+2))

________________________________________________________________________________________

maxima [A]  time = 1.35, size = 10, normalized size = 0.83 \begin {gather*} \frac {1}{2} \, \log \left (x^{2} + 2 \, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x^2+2*x),x, algorithm="maxima")

[Out]

1/2*log(x^2 + 2*x)

________________________________________________________________________________________

mupad [B]  time = 0.18, size = 8, normalized size = 0.67 \begin {gather*} \frac {\ln \left (x\,\left (x+2\right )\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x + 1)/(2*x + x^2),x)

[Out]

log(x*(x + 2))/2

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 8, normalized size = 0.67 \begin {gather*} \frac {\log {\left (x^{2} + 2 x \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x**2+2*x),x)

[Out]

log(x**2 + 2*x)/2

________________________________________________________________________________________